﻿using System;
using System.Collections.Generic;
using Scommesse.Model;
using System.Drawing;
using Scommesse.Utility;

namespace Scommesse.Presenters.Adapters
{
    class QuotaAdapter : IEntity
    {
        private readonly Quota _quota;
        private readonly Color _backColor;
        private readonly Color _foreColor;
        private readonly Font _font;

        public QuotaAdapter(Quota quota)
        {
            _quota = quota;
            _backColor = Color.Empty;
            _foreColor = Color.Empty;
        }

        public QuotaAdapter(Quota quota,Font font)
        {
            _quota = quota;
            _backColor = Color.Empty;
            _foreColor = Color.Empty;
            _font = font;
        }

        public QuotaAdapter(Quota quota, Color backColor, Color foreColor, Font font)
        {
            if (quota == null)
                throw new ArgumentNullException("quota");
            _quota = quota;
            _backColor = backColor;
            _foreColor = foreColor;
            _font = font;
        }

        public string FullName
        {
            get { return StringValueAttribute.GetStringValue(_quota.Valore.GetValore()) + " => " + _quota.Moltiplicatore; }
        }

        public Color BackColor
        {
            get { return _backColor; }
        }

        public Color ForeColor
        {
            get { return _foreColor; }
        }

        public Font Font
        {
            get { throw new NotImplementedException(); }
        }
    }
}
